import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.Color;
    public class triImageRenderer extends JComponent implements TableCellRenderer {
        Image img1;
        Image img2;
        Image img3;
        JTable thisTable;
        
        boolean selected;
        
        public Component getTableCellRendererComponent(JTable table, Object value,
                boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {
            img1 = ((ThreeImage)value).img1;
            img2 = ((ThreeImage)value).img2;
            img3 = ((ThreeImage)value).img3;
            thisTable = table;
            selected = isSelected;
            
            return this;
        }
    
        // Paint current color
        public void paint(Graphics g) {
                        
			
			g.drawImage(img3,0,0,null,null);
                        g.drawImage(img2,0,0,null,null);
                        g.drawImage(img1,0,0,null,null);
                        
			
                        
                        if(selected)
                        {
                            g.setColor(new Color(49,106,197,150));
                            g.fillRect(0,0, thisTable.getRowHeight(), thisTable.getRowHeight());
                        }
			
        }
    }